/*  1:   */ package org.intellij.plugins.relaxNG.compact;
/*  2:   */ 
/*  3:   */

import com.intellij.lexer.Lexer;
import com.intellij.openapi.editor.DefaultLanguageHighlighterColors;
import com.intellij.openapi.editor.HighlighterColors;
import com.intellij.openapi.editor.colors.CodeInsightColors;
import com.intellij.openapi.editor.colors.TextAttributesKey;
import com.intellij.openapi.fileTypes.SyntaxHighlighterBase;
import com.intellij.psi.tree.IElementType;
import org.intellij.plugins.relaxNG.compact.lexer.CompactSyntaxLexerAdapter;
import org.jetbrains.annotations.NotNull;

import java.util.HashMap;
import java.util.Map;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */
/*  9:   */
/* 10:   */
/* 11:   */
/* 12:   */
/* 13:   */
/* 14:   */ 
/* 15:   */ public class RncHighlighter
/* 16:   */   extends SyntaxHighlighterBase
/* 17:   */ {
/* 18:   */   @NotNull
/* 19:   */   public Lexer getHighlightingLexer()
/* 20:   */   {
/* 21:40 */     void tmp7_4 = new CompactSyntaxLexerAdapter();
/* 22:40 */     if (tmp7_4 == null) {
/* 23:40 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/plugins/relaxNG/compact/RncHighlighter", "getHighlightingLexer" }));
/* 24:   */     }
/* 25:40 */     return tmp7_4;
/* 26:   */   }
/* 27:   */   
/* 28:46 */   private static final Map<IElementType, TextAttributesKey> a = new HashMap();
/* 29:   */   
/* 30:   */   static
/* 31:   */   {
/* 32:48 */     fillMap(a, RncTokenTypes.KEYWORDS, DefaultLanguageHighlighterColors.KEYWORD);
/* 33:49 */     fillMap(a, RncTokenTypes.OPERATORS, DefaultLanguageHighlighterColors.OPERATION_SIGN);
/* 34:   */     
/* 35:51 */     fillMap(a, RncTokenTypes.STRINGS, DefaultLanguageHighlighterColors.STRING);
/* 36:   */     
/* 37:53 */     a.put(RncTokenTypes.LBRACE, DefaultLanguageHighlighterColors.BRACES);
/* 38:54 */     a.put(RncTokenTypes.RBRACE, DefaultLanguageHighlighterColors.BRACES);
/* 39:   */     
/* 40:56 */     a.put(RncTokenTypes.LBRACKET, DefaultLanguageHighlighterColors.BRACKETS);
/* 41:57 */     a.put(RncTokenTypes.RBRACKET, DefaultLanguageHighlighterColors.BRACKETS);
/* 42:   */     
/* 43:59 */     a.put(RncTokenTypes.LPAREN, DefaultLanguageHighlighterColors.PARENTHESES);
/* 44:60 */     a.put(RncTokenTypes.RPAREN, DefaultLanguageHighlighterColors.PARENTHESES);
/* 45:   */     
/* 46:62 */     a.put(RncTokenTypes.COMMA, DefaultLanguageHighlighterColors.COMMA);
/* 47:   */     
/* 48:64 */     fillMap(a, RncTokenTypes.DOC_TOKENS, DefaultLanguageHighlighterColors.DOC_COMMENT);
/* 49:65 */     fillMap(a, RncTokenTypes.COMMENTS, DefaultLanguageHighlighterColors.LINE_COMMENT);
/* 50:   */     
/* 51:67 */     fillMap(a, RncTokenTypes.IDENTIFIERS, CodeInsightColors.LOCAL_VARIABLE_ATTRIBUTES);
/* 52:   */     
/* 53:69 */     a.put(RncTokenTypes.ILLEGAL_CHAR, HighlighterColors.BAD_CHARACTER);
/* 54:   */   }
/* 55:   */   
/* 56:   */   @NotNull
/* 57:   */   public TextAttributesKey[] getTokenHighlights(IElementType paramIElementType)
/* 58:   */   {
/* 59:74 */     TextAttributesKey[] tmp15_12 = pack((TextAttributesKey)a.get(paramIElementType));
/* 60:74 */     if (tmp15_12 == null) {
/* 61:74 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/plugins/relaxNG/compact/RncHighlighter", "getTokenHighlights" }));
/* 62:   */     }
/* 63:74 */     return tmp15_12;
/* 64:   */   }
/* 65:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.intellij.plugins.relaxNG.compact.RncHighlighter

 * JD-Core Version:    0.7.0.1

 */